Finally, fsync to ensure all entries are on disk, unless disabled.
We support disabling this for cases like server-side buildroot
construction where we don't need to be robust against power loss
* this should be configurable for the case where we're constructing
* buildroots.
*/
- if (fsync (destination_dfd) == -1)
+ if (!self->disable_fsync)
{
- ot_util_set_error_from_errno (error, errno);
- goto out;
+ if (fsync (destination_dfd) == -1)
+ {
+ ot_util_set_error_from_errno (error, errno);
+ goto out;
+ }
}
ret = TRUE;